<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<meta name="format-detection" content="telephone=no">
	<title>{$site_seo_title}</title>
	<base id="headbase" href="__TMPL__/seatsel/" />
	{include file="./tplnew/public/css_weui.html" /}
	<link rel="stylesheet" href="css/style.css?{$suffix}" />
</head>
<body>
<!--主体-->
<div class="weui-content">
	<!--主图轮播-->
	<div class="swiper-container swiper-zhutu">
		<div class="swiper-wrapper">
			{volist name="pictureList" id="vo"}
				<div class="swiper-slide"><img src="{$vo['picurl']}" /></div>
			{/volist}
		</div>
		<div class="swiper-pagination swiper-zhutu-pagination"></div>
	</div>
	
	<div class="clear"></div>
	
	<div class="weui-cells">
		<div class="weui-cell">
			<div class="weui-cell__bd">
				<h4 class="wy-media-box__title">{$productInfo['name']}</h4>
				<div class="wy-pro-pri">
					<span class="price-name hide">¥</span>
					<em class="real-price">{$productInfo['price_section']}</em>
					<span class="price-name">元</span>
					<span class="original-price hide">原价：{$productInfo['price_section']}</span>
				</div>
			</div>
		</div>
		<div class="weui-cell">
			<div class="weui-cell__bd">
				<div class="weui-flex stock-detail">
					<div class="weui-flex__item hide">
						<div class="name">库存：{$productInfo['stock_num']}</div>
					</div>
					<div class="weui-flex__item">
						<div class="name">销量：{$productInfo['sale_num']}</div>
					</div>
					<div class="weui-flex__item c-red hide">{$statusName}</div>
				</div>
			</div>
		</div>
		{if condition="$productInfo['share_link']"}
		<div class="weui-cell active-detail">
			<div class="weui-cell__bd">
				<a href="{$productInfo['share_link']}">点击查看活动详情 ></a>
			</div>
		</div>
		{/if}
	</div>

	<div class="weui-cells">
		<a href="{:url('seatsel/index/index')}" class="weui-cell weui-cell_access">
			<div class="weui-cell__bd">
				<i class="custom-store-img"></i>{$configInfo['proj_name']}
			</div>
			<div class="custom-store-enter">进入店铺</div>
			<div class="weui-cell__ft"></div>
		</a>
		<div class="weui-cell">
			<div class="renzheng block-item">
				<span class="js-rz-item-alert rz-item" data-type="team_certificate_company">
					<span class="rz-name f12 c-gray-darker">企业认证</span>
				</span>
				<span class="js-rz-item-alert rz-item" data-type="is_secured_transactions">
					<span class="rz-name f12 c-gray-darker">担保交易</span>
				</span>
				<span class="js-rz-item-alert rz-item" data-type="team_physical">
					<span class="rz-name f12 c-gray-darker">线下门店</span>
				</span>
			</div>
		</div>
	</div>
	
	<div class="weui-panel weui-panel_access">
		<div class="weui-panel__hd">演出介绍</div>
		<div class="weui-panel__bd">
			<div class="pro-content">
				{$productInfo['content']}
			</div>
		</div>
	</div>
</div>

<span id="tophovertree" title="返回顶部"></span>

<!--底部导航-->
<div class="foot-blank"></div>

<div class="wy-foot-wrap">
	<div class="wy-remain-time">
		{if condition="$productInfo['end_time']"}
		<div id="J_remainTime" class="countdown"></div>
		{/if}
	</div>
{if condition="$productInfo['type'] == 2"}
	<div class="weui-tabbar">
		<a href="{:url('seatsel/index/index')}" class="promotion-foot-menu-items">
			<div class="weui-tabbar__icon promotion-foot-menu-kefu"></div>
			<p class="weui-tabbar__label">首页</p>
		</a>
		<a href="javascript:;" class="promotion-foot-menu-items J_doFavorite">
			<div class="weui-tabbar__icon {$collectClass}"></div>
			<p class="weui-tabbar__label">收藏</p>
		</a>
		<a href="javascript:;" class="promotion-foot-menu-items J_kefu">
			<div class="weui-tabbar__icon promotion-foot-menu-kefu"></div>
			<p class="weui-tabbar__label">客服</p>
		</a>
		<a href="{:url('seatsel/cart/index')}" class="promotion-foot-menu-items">
			<span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;display: none;">8</span>
			<div class="weui-tabbar__icon promotion-foot-menu-cart"></div>
			<p class="weui-tabbar__label">我的</p>
		</a>
		{if condition="$statusFlag == 1"}
		<a href="javascript:;" class="weui-tabbar__item red-color open-popup2 J_buyItPopup">
			<p class="promotion-foot-menu-label">立即购买</p>
		</a>
		{elseif condition="$statusFlag == 2" /}
		<a href="javascript:;" class="weui-tabbar__item gray-color open-popup2">
			<p class="promotion-foot-menu-label">即将开售</p>
		</a>
		{elseif condition="$statusFlag == 3" /}
		<a href="javascript:;" class="weui-tabbar__item gray-color open-popup2">
			<p class="promotion-foot-menu-label">活动已结束</p>
		</a>
		{/if}
	</div>
{else /}
	<div class="weui-tabbar">
		<a href="{:url('seatsel/index/index')}" class="promotion-foot-menu-items">
			<div class="weui-tabbar__icon promotion-foot-menu-home"></div>
			<p class="weui-tabbar__label">首页</p>
		</a>
		<a href="javascript:;" class="promotion-foot-menu-items J_doFavorite">
			<div class="weui-tabbar__icon {$collectClass}"></div>
			<p class="weui-tabbar__label">收藏</p>
		</a>
		{if condition="$statusFlag eq 1"}
		<a href="javascript:;" class="weui-tabbar__item red-color open-popup2 J_buyItPopup">
			<p class="promotion-foot-menu-label">立即购买</p>
		</a>
		{elseif condition="$statusFlag eq 2" /}
		<a href="javascript:;" class="weui-tabbar__item gray-color open-popup2">
			<p class="promotion-foot-menu-label">即将开售</p>
		</a>
		{elseif condition="$statusFlag eq 3" /}
		<a href="javascript:;" class="weui-tabbar__item gray-color open-popup2">
			<p class="promotion-foot-menu-label">活动已结束</p>
		</a>
		{/if}
	</div>
{/if}
</div>

<!-- 废弃 -->
<div id="join_cart" class='weui-popup__container popup-bottom hide' style="z-index:600;">
	<div class="weui-popup__overlay" style="opacity:1;"></div>
	<div class="weui-popup__modal">
		<div class="modal-content">
			<div class="weui-msg" style="padding-top:0;">
				<div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
				<div class="weui-msg__text-area">
					<h2 class="weui-msg__title">成功加入购物车</h2>
					<p class="weui-msg__desc">亲爱的用户，您的商品已成功加入购物车，为了保证您的商品快速送达，请您尽快到购物车结算。</p>
				</div>
				<div class="weui-msg__opr-area">
					<p class="weui-btn-area">
						<a href="shopcart.html" class="weui-btn weui-btn_primary">去购物车结算</a>
						<a href="javascript:;" class="weui-btn weui-btn_default close-popup">不，我再看看</a>
					</p>
				</div>
			</div>
		</div>
	</div>
</div>

<div id="selcet_sku" class='weui-popup__container popup-bottom' style="z-index:600;">
	<div class="weui-popup__overlay" style="opacity:1;"></div>
	<div class="weui-popup__modal">
		<div class="toolbar">
			<div class="toolbar-inner">
				<a href="javascript:;" class="picker-button close-popup">关闭</a>
				<h1 class="title">选择场次</h1>
			</div>
		</div>
		<div class="modal-content">
			<div class="weui-msg" style="padding-top:0;background: #fff;">

<form method="post" action="{:url('seatsel/orderSubmit/index')}" class="J_ajaxForm">
	<input type="hidden" id="J_productId" name="initPid" value="{$pid}" />
	<input type="hidden" id="J_specId" name="initSpecId" value="0" />
	<div class="weui-cells" style="margin-bottom:20px;">
		<div class="weui-cell">
			<div id="J_handle">
				<dl class="weui-media-box_appmsg">
					<dt class="weui-media-box__hd proinfo-txt-l2"><span class="promotion-label-tit">选择场次</span></dt>
					<dd class="weui-media-box__bd">
						<div class="promotion-sku cc J_spec">
							<ul>
								{volist name="specList" id="vo"}
									<li data-id="{$vo['id']}"><span>{$vo['name']}</span></li>
								{/volist}
							</ul>
						</div>
					</dd>
				</dl>
			</div>
		</div>
	</div>
	<div class="weui-msg__opr-area2">
		<p class="weui-btn-area-cart">
			<button type="button" id="J_buyItBtn" class="weui-btn weui-btn_cart">选座购买</button>
		</p>
	</div>
</form>

			</div>
		</div>
	</div>
</div>


<?php
$layerStyle = 2;
$nofastclick = 1;
?>
{include file="./tplnew/seatsel/com_body.html" /}
{include file="./tplnew/public/script_weui.html" /}
{include file="./tplnew/seatsel/com_script.html" /}

<!-- tab切换 -->
<script type="text/javascript" src="__STATIC__/Zz22zzUI/addon/tab.js"></script>
<script type="text/javascript">
$(".J_tabHead").on('click', 'a', function(){
	$(".J_tabHead a").removeClass('weui-bar__item--on');
	$(this).addClass('weui-bar__item--on');
	var index = $(".J_tabHead a").index(this);
	console.log(index);
	$(".J_tabCont .tab-content").hide();
	$(".J_tabCont .tab-content").eq(index).show();
})
</script>

<!--图片轮播-->
<script type="text/javascript" src="__STATIC__/Zz22zzUI/addon/swiper/swiper.jquery.min.js"></script>
<script type="text/javascript">
$(".swiper-zhutu").swiper({
	loop: true,
	paginationType:'fraction',
	autoplay:5000
});
</script>

<!-- 倒计时 -->
<script type="text/javascript">
var statusFlag = {$statusFlag};
var start_time = "{$productInfo['start_time']}";
var end_time = "{$productInfo['end_time']}";
var nowtime = "{$ts}";
</script>
<script type="text/javascript" src="js/remainTime.js"></script>

<!-- 购物车和购买 -->
<script type="text/javascript">
//立即购买
$(".J_buyItPopup").click(function(e){
	$("#selcet_sku").popup();
	$("#J_buyItBtn").removeClass("hide");
	$("#J_addCartBtn").addClass("hide");
});
</script>

<script type="text/javascript">
$(".J_spec li").click(function(e){
	$('#J_specId').val($(this).data('id'));
	$('.J_spec li').each(function(){
		$(this).removeClass('active');
	});
	$(this).addClass('active');
});
//var url_chooseSeat = "{:url('seatsel/choose/chooseSeat')}";
//var url_chooseSeat = "/index.php?s=seatsel/choose/chooseSeat";
var url_chooseSeat = "/seatsel/choose/chooseSeat";
//选座购买
$("#J_buyItBtn").click(function(e){
	var specId = $('#J_specId').val();
	if(specId == 0){
		Wei.Util.wapTipNew({msg: '请选择场次', icon: 2});
		return;
	}
	var url = url_chooseSeat+'?specId='+specId;
	//console.log(url);
	//直接跳去选座购买的页面
	window.location.href = url;
});
</script>

<!-- 收藏 -->
<script type="text/javascript">
var url_fav = "{:url('seatsel/productOperate/doCollect', array('pid'=>$pid))}";
$('.J_doFavorite').on("click", function(e){
	e.preventDefault();
	var that = $(this);
	$.get(url_fav, '', function(ret){
		if(ret.code == 1){
			Wei.Util.wapTipNew({msg: ret.msg, icon: 1, time: ret.time,});
			//var retData = ret.data;
			//if(retData.flag == 1){
			//    that.find('img').attr('src', 'images/star-full.png');
			//}else{
			//    that.find('img').attr('src', 'images/star-empty.png');
			//}
		}else if(ret.code == 0){
			Wei.Util.wapTipNew({msg: ret.msg, icon: 2, time: ret.time,});
		}

		Wei.Util.readyToJump(ret);
	},'json');
})
</script>

<script type="text/javascript">
var kefu = "<img src='{$configInfo['kefu_ewm']}' />";
//客服
$('.J_kefu').on("click", function(e){
	$.alert(kefu, "联系客服");
})
</script>

<!-- 分享相关 -->
{include file="./tplnew/public/com_share.html" /}

</body>
</html>